package com.db.blog;

import java.sql.SQLException;
import java.util.*;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

public class BlogDAO extends SqlMapClientDaoSupport implements Blog {

	public void blogmainInfo(Map map) throws SQLException {
		getSqlMapClientTemplate().queryForObject("blogmainInfo", map);
	}

	public List BmBoardList(String idtype) throws SQLException {
		return getSqlMapClientTemplate().queryForList("blogList", idtype);
	}

	public int hitCount(String id) throws SQLException {
		return (Integer) getSqlMapClientTemplate().queryForObject("hitCount",
				id);
	}

	public void hitUpdate(int count) throws SQLException {
		getSqlMapClientTemplate().update("hitUpdate", count);
	}

	public void hitInsert(String id) throws SQLException {
		getSqlMapClientTemplate().insert("hitInsert", id);
	}

	public int hitSelect(String id) throws SQLException {
		return (Integer) getSqlMapClientTemplate().queryForObject("hitSelect",
				id);
	}
}
